package com.qf.util;

import javax.servlet.*;
import java.io.IOException;

/**
 * 2019/11/18
 * Administrator
 * springmvc1118
 * 面向对象面向君  不负代码不负卿
 */
public class MyFilterB implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("初始化BFilter");
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
       System.out.println("BFilter开始执行");
        filterChain.doFilter(servletRequest,servletResponse);  //执行下一个过滤器或处理方法
        System.out.println("BFilter结束执行");
    }

    @Override
    public void destroy() {
        System.out.println("销毁BFilter");
    }
}
